Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WIP on desired bindgen output #93

Closed
wants to merge 7 commits into from
Closed

Conversation

madsmtm
Copy link
Owner

@madsmtm madsmtm commented Dec 21, 2021

Progress on evaluating if and/or how we should do #85.

Don't look too much at the objc2-foundation-sys stuff, the idea is that that part would be automatically generated - rather, focus on objc2-foundation, and think about whether using the bindings is better or worse.

@madsmtm madsmtm added the enhancement New feature or request label Dec 21, 2021
@madsmtm
Copy link
Owner Author

madsmtm commented Dec 21, 2021

Another random idea: Add a new macro that makes it possible to still use the "familiar" msg_send! syntax:

msg_send_2![self, getObjects: vec.as_ptr(), range: range]
// ->
self.getObjects_range_(vec.as_ptr(), range)

This would require the paste macro.

@madsmtm madsmtm force-pushed the bindgen-desired-result branch 2 times, most recently from dd1cd75 to e26f51f Compare January 12, 2022 16:29
@madsmtm madsmtm force-pushed the bindgen-desired-result branch from e26f51f to 795d83d Compare April 2, 2022 20:49
@madsmtm madsmtm force-pushed the bindgen-desired-result branch from 795d83d to 272fd53 Compare July 5, 2022 16:47
@madsmtm madsmtm force-pushed the bindgen-desired-result branch from 272fd53 to 819d96d Compare July 5, 2022 20:06
@madsmtm madsmtm mentioned this pull request Sep 4, 2022
@madsmtm
Copy link
Owner Author

madsmtm commented Nov 3, 2022

The biggest problem I had with this approach was that the separation between a sys crate and a "Rusty" crate lead to a lot of unnecessary duplication - and you're effectively always going to just be using the sys crate since we can't possibly hope to make "Rusty" bindings for all of Foundation/AppKit.

Future work in this problem space is happening in #264

@madsmtm madsmtm closed this Nov 3, 2022
@madsmtm madsmtm deleted the bindgen-desired-result branch November 3, 2022 22:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants